/**
 * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **/

.product-reviews-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.product-average-rating-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.product-average-rating {
  background-color: #4a89dc;
  color: white;
  font-size: 18px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.product-reviews-count {
  color: #555;
  font-size: 16px;
}

.comment-form {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-form h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.rate-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.rate-input input {
  display: none;
}

.rate-input label {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
  margin: 0 2px;
}

.rate-input label:hover,
.rate-input label:hover ~ label,
.rate-input input:checked ~ label {
  color: #ffc107;
}

.rate-input .rate-1-star:before { content: "★"; }
.rate-input .rate-2-star:before { content: "★"; }
.rate-input .rate-3-star:before { content: "★"; }
.rate-input .rate-4-star:before { content: "★"; }
.rate-input .rate-5-star:before { content: "★"; }

.comment-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  font-family: inherit;
  resize: vertical;
}

.comment-submit-button {
  background-color: #4a89dc;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.comment-submit-button:hover {
  background-color: #357bd8;
}

.comment-submit-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.comments-list {
  margin-top: 30px;
}

.comments-list-title {
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
}

.comment-item {
  margin-bottom: 20px;
  padding: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-username {
  font-weight: bold;
  color: #333;
}

.comment-rating {
  background-color: #4a89dc;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.comment-date {
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}

.comment-text {
  margin-top: 10px;
  color: #555;
  line-height: 1.5;
}

.no-comments-message {
  padding: 20px;
  text-align: center;
  color: #777;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.comment-error {
  color: #e74c3c;
  margin-top: 10px;
  font-weight: bold;
}